package com.atguigu.day14.test01;

import java.util.Scanner;

/**
 * @author fenge
 */
public class Test01 {//字符串123反转
    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);
        String str = s.next();

        System.out.print("录入的字符串：");
        System.out.println(str);
        char[] ch = str.toCharArray();
        for (int i = 0;i<ch.length/2;i++){
            char temp = ch[i];
            char temp2 = ch[ch.length-1-i];
            ch[ch.length-1-i] = temp;
            ch[i]=temp2;
        }
        System.out.print("反转的字符串：");
        for (int i = 0;i<ch.length;i++){
            System.out.print(ch[i]);
        }

    }
}
